package com.mindata.blockchain.core.manager;

import com.mindata.blockchain.core.model.GwUser;
import com.mindata.blockchain.core.model.MessageEntity;
import com.mindata.blockchain.core.repository.MessageRepository;
import com.mindata.blockchain.core.repository.UserRepository;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author wuweifeng wrote on 2018/3/28.
 */
@Component
public class UserManager {
    @Resource
    private UserRepository userRepository;

    public List<GwUser> findAll() {
        return userRepository.findAll();
    }


    public GwUser findById(String id) {
        return userRepository.findByUid(id);
    }
}
